package com.cms.hilt

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import com.alibaba.android.arouter.facade.annotation.Route
import com.android.baselibrary.arouter.ArouterContains
import com.android.baselibrary.base.BaseActivity
import com.cms.hilt.databinding.ActivityHiltMainBinding
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

@Route(path = ArouterContains.HILT_MODEL)
@AndroidEntryPoint
class HiltMainActivity : BaseActivity<ActivityHiltMainBinding>() {
    val TAG = "HiltClass"

    @Inject
    lateinit var studentModule:StudentModule

    @Inject
    lateinit var student: Student

 /*   @Inject
    lateinit var apple: Apple*/

    @BindApple
    @Inject
    lateinit var fruit: Fruit

    override fun getLayoutId(): Int = R.layout.activity_hilt_main

    override fun initView() {
        Log.i(TAG, "initView: student:$student")
        Log.i(TAG, "initView: apple:${fruit.eat()}")
       mBinding.tvContent.text = studentModule.toString()
    }

    override fun initListener() {

    }

}